package com.huaxin.hxcloud.work;

import android.content.Context;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.huaxin.common.Entity.HxScSyncDataDTO;
import com.huaxin.hxcloud.R;

import java.util.List;

/**
 * @author songxf
 * @date 2018/5/22
 * @Desc 首创综合 站点 适配器
 * Copyright HUAXIN DATA. All rights reserved.
 */
public class HxScSyncDataAdapter extends BaseQuickAdapter<HxScSyncDataDTO.DataBean.OcBean, BaseViewHolder> {
    private Context mContext;

    public HxScSyncDataAdapter(Context context) {
        super(R.layout.item_sc_sync_data_list);
        this.mContext = context;
    }


    @Override
    protected void convert(BaseViewHolder helper, HxScSyncDataDTO.DataBean.OcBean item) {
        TextView titleTv = helper.getView(R.id.title_tv);
        titleTv.setText((item.getOrgName() + ""));
        RecyclerView recyclerView = helper.getView(R.id.recyclerview);
        recyclerView.setLayoutManager(new LinearLayoutManager(mContext));
        HxScSyncOcAadapter syncDataItmeAadapter = new HxScSyncOcAadapter();
        syncDataItmeAadapter.addData(item.getProcess());
        recyclerView.setAdapter(syncDataItmeAadapter);
    }

}
